home *** CD-ROM | disk | FTP | other *** search
- # Jedi Knight Missions Cog Script
- #
- # POW_EWEB_M.COG
- #
- # POWERUP Script - EWEB Gun
- #
- # [RF]
- #
- # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
-
-
- symbols
-
- thing powerup local
- thing player local
- int bin=10 local
- int mappedBin local
- int ammobin=92 local
- flex amount local
-
- message activated
-
- end
-
- # ========================================================================================
-
- code
-
- activated:
- player = GetSourceRef();
- powerup = GetSenderRef();
-
- if (!GetInv(player, ammobin))
- {
- jkPrintUNIString(player, 380); // You have no ammo to use with the EWEB!
- }
- else
- {
- if (!IsThingCrouching(player)) // Do not allow selection while crouching.
- {
- jkPrintUNIString(player, 382); // The Blaster Cannon!
-
- mappedBin = GetWeaponBin(bin);
-
- SetInvActivated(player, mappedBin, 1);
-
- // Make the inventory equal to the powerup
- // reference. Got a problem with that? Huh?
- SetInv(player, mappedBin, powerup);
-
- SelectWeapon(player, mappedBin);
- }
- }
- Return;
-
- end
-